import SupplierInfo from './SupplierInfo'
import * as actions from '../../redux/actions/SupplierInfoAction'
import { StoreState } from '../../redux/Types'
import { Dispatch } from 'redux'
import { connect } from 'react-redux'


export function mapStateToProps({ supplier: { record, loading } }: StoreState) {
  return {
    record,
    loading
  }
}
export function mapDispatchToProps(dispatch: Dispatch<actions.RecordSupplierInfo>) {
  return {
    recordInfo: (data: any) => {
      dispatch(actions.recordSupplierInfo(data))
    }
  }
}
export default connect(mapStateToProps, mapDispatchToProps)(SupplierInfo)